package com.myprojects.authenticationservice;

//import com.example.permissionservice.PermissionServiceApplication;
//import com.example.permissionservice.pojo.Resource;
//import com.myprojects.common.CommonApplication;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
//@EnableHystrix
@MapperScan(basePackages = {
		"com.myprojects.common",
		"com.example.permissionservice.dao"}
		)
@ComponentScan(
		basePackages= {
//				"com.example.permissionservice",
				"com.myprojects.authenticationservice",
				"com.myprojects.common.config"},
		//正则表达式需要完全匹配!!!(org\.example\.Default.*)
		excludeFilters = {
				@ComponentScan.Filter(type = FilterType.REGEX, pattern = "com\\.example\\.permissionservice\\.config.*"),

				@ComponentScan.Filter(type = FilterType.REGEX, pattern = "com\\.example\\.permissionservice\\.pojo.*")
//				@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes  = {CorsConfig.class, PermissionServiceApplication.class},
//				@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes  = {PermissionServiceApplication.class, CommonApplication.class, Resource.class})
				}
)

public class AuthenticationServiceApplication {

	public static void main(String[] args) {
		SpringApplication.run(AuthenticationServiceApplication.class, args);
	}

}
